From: Alban Crequy Date: Thu, 14 Feb 2013 15:28:43 +0000 (+0000) Subject: lg: add a reference to lookingGlass in the Extensions tab. X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4672 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a8a4a85daccf35a02afcc232735cb046e55b6ab9;p=gnome-shell.git lg: add a reference to lookingGlass in the Extensions tab. When the user clicks on "View Source" or "Web Page" in the "Extensions" tab of looking glass, the callback _onViewSource() or _onWebPage() is called and they try to close looking glass: this._lookingGlass.close(); But it does not work and generate the exception "this._lookingGlass is undefined". This patch fixes that. https://bugzilla.gnome.org/show_bug.cgi?id=693814 --- diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index f39479bb5..718942eb8 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -685,7 +685,8 @@ const Memory = new Lang.Class({ const Extensions = new Lang.Class({ Name: 'Extensions', - _init: function() { + _init: function(lookingGlass) { + this._lookingGlass = lookingGlass; this.actor = new St.BoxLayout({ vertical: true, name: 'lookingGlassExtensions' }); this._noExtensions = new St.Label({ style_class: 'lg-extensions-none', @@ -912,7 +913,7 @@ const LookingGlass = new Lang.Class({ this._memory = new Memory(); notebook.appendPage('Memory', this._memory.actor); - this._extensions = new Extensions(); + this._extensions = new Extensions(this); notebook.appendPage('Extensions', this._extensions.actor); this._entry.clutter_text.connect('activate', Lang.bind(this, function (o, e) {